/* =================================
   顶部导航组件样式
   ================================= */

/* 顶部导航栏 - 固定浮动在顶部 */
.layout-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 var(--space-lg);
    background: rgba(29, 43, 64, 0.95);
    border-bottom: 1px solid rgba(33, 150, 243, 0.3);
    z-index: var(--z-fixed);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-lg);
    transition: all var(--duration-normal) ease;
}

/* Logo区域 */
.layout-logo {
    font-size: var(--font-xl);
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
}

.layout-logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    color: var(--primary-green);
    font-size: 1.8rem;
    transition: all var(--duration-normal) ease;
}

.layout-logo:hover .logo-icon {
    color: var(--accent-cyan);
    transform: rotate(10deg);
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 弹性空间 */
.header-spacer {
    flex: 1;
}

/* 导航菜单 */
.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin: 0 var(--space-xl);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--font-sm);
    font-weight: 500;
    transition: all var(--duration-normal) ease;
    position: relative;
}

.nav-item i {
    font-size: var(--font-lg);
    margin-bottom: var(--space-xs);
}

.nav-item:hover {
    color: var(--primary-green);
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 1px;
}

/* 右侧小部件区域 */
.header-widgets {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.weather-widget,
.sync-widget,
.user-profile {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--duration-normal) ease;
    cursor: pointer;
}

.weather-widget {
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.weather-widget:hover {
    background: rgba(33, 150, 243, 0.25);
    transform: translateY(-1px);
}

.sync-widget {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.sync-widget:hover {
    background: rgba(76, 175, 80, 0.25);
    transform: translateY(-1px);
}

.sync-widget .sync-icon {
    animation: spin 2s linear infinite;
}

.user-profile {
    background: rgba(255, 157, 0, 0.15);
    border: 1px solid rgba(255, 157, 0, 0.2);
}

.user-profile:hover {
    background: rgba(255, 157, 0, 0.25);
    transform: translateY(-1px);
}

.user-icon {
    font-size: var(--font-lg);
}

/* =================================
   演示页面样式
   ================================= */

body {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    min-height: 100vh;
    padding-top: 60px; /* 为导航栏留出空间 */
}

.demo-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding: var(--space-xl);
}

.demo-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 600px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-xl);
}

.demo-card h2 {
    font-size: var(--font-2xl);
    margin-bottom: var(--space-lg);
    color: var(--primary-green);
    font-weight: 600;
}

.demo-card p {
    font-size: var(--font-lg);
    margin-bottom: var(--space-xl);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.demo-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.9);
    transition: all var(--duration-normal) ease;
}

.feature-item:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon);
}

.feature-item i {
    color: var(--primary-green);
    font-size: var(--font-lg);
}

/* =================================
   响应式调整
   ================================= */

@media (max-width: 1024px) {
    .layout-header {
        padding: 0 var(--space-md);
    }
    
    .header-nav {
        margin: 0 var(--space-lg);
        gap: var(--space-md);
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item {
        padding: var(--space-sm);
    }
    
    .header-widgets {
        gap: var(--space-sm);
    }
    
    .weather-text,
    .sync-text,
    .user-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .layout-header {
        padding: 0 var(--space-sm);
    }
    
    .layout-logo .logo-text {
        display: none;
    }
    
    .header-nav {
        display: none;
    }
    
    .demo-features {
        grid-template-columns: 1fr;
    }
}

/* =================================
   动画效果
   ================================= */

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 导航栏进入动画 */
.layout-header {
    animation: slideInDown 0.6s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
